//
//  MDObjManager.h
//  jewelryMD
//
//  Created by 洪闽程 on 2018/4/23.
//  Copyright © 2018年 洪闽程. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface MDObjManager : NSObject
#pragma 把对象归档存到沙盒里
+(void)md_saveObject:(id)object byFileName:(NSString*)fileName;

#pragma 通过文件名从沙盒中找到归档的对象
+(id)md_getObjectByFileName:(NSString*)fileName;

#pragma 根据文件名删除沙盒中的 plist 文件
+(void)md_removeFileByFileName:(NSString*)fileName;

#pragma 存储用户偏好设置 到 NSUserDefults
+(void)md_saveUserData:(id)data forKey:(NSString*)key;

#pragma 读取用户偏好设置
+(id)md_readUserDataForKey:(NSString*)key;

#pragma 删除用户偏好设置
+(void)md_removeUserDataForkey:(NSString*)key;

+(void)setData:(id)data forKey:(NSString *)key;

+(id)loadDataforKey:(NSString *)key;

+(NSString *)KeyedArchiverPathName:(NSString *)pathName;

@end
